﻿// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
//using System;

//class GCDAndLCM
//{
  //  static void Main()
  //  {
        Console.Write("请输入第一个正整数：");
        int m = Convert.ToInt32(Console.ReadLine());
        Console.Write("请输入第二个正整数：");
        int n = Convert.ToInt32(Console.ReadLine());

        int gcd = 1;
        int tempM = m;
        int tempN = n;

        while (tempN != 0)
        {
            int remainder = tempM % tempN;
            tempM = tempN;
            tempN = remainder;
        }

        gcd = tempM;
        int lcm = (m * n) / gcd;

        Console.WriteLine($"最大公约数：{gcd}");
        Console.WriteLine($"最小公倍数：{lcm}");
  //  }
//}